A=input().split()
slova=["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
if len (A)==3:
    for i in range(3):
        if A[i] in slova:
            break
        
else:
    print("Wrong  input")
for i in range(3):
    if A[0]==slova[i]:
        s=i*100
    if A[1]==slova[i]:
        s+=i*10
    if A[2]==slova[i]:
        s+=i*1
print(s)
